/*
 * StreamEndPlugin.h
 *
 *  Created on: 2011-3-29
 *      Author: hao
 */

#ifndef STREAMENDPLUGIN_H_
#define STREAMENDPLUGIN_H_

#include <functional>

extern "C" bool StreamEndInit();

extern "C" void StreamEndDestroy();

extern "C" bool CreateStream( int sample_format, int channels, int rate );

extern "C" bool DestroyStream();

extern "C" void StreamStop();

extern "C" void StreamStart();

extern "C" void StreamPause();

extern "C" void SetWriteStreamCallback( const std::function<bool( void *, size_t, size_t * )> & write_callback );

extern "C" void SetDrainStreamCallback( const std::function<void()> & drain_callback );

//可选

extern "C" void SetVolumeDB( double db );

extern "C" void SetVolumeLinear( double linear );

extern "C" void ChannleSetVolumeDB( int channle, double db );

extern "C" void ChannleSetVolumeLinear( int channle, double linear );

extern "C" unsigned long long StreamGetCurTime();

#endif /* STREAMENDPLUGIN_H_ */
